<template>
  <component
    :is="view.type"
    v-bind="view.attrs"
    class="pg-w-[100%]"
    style="height: 100%; background-color: #fff"
    v-debug="{ vms, models, dataSet }"
  >
    
    <Tabs name="type" v-model="tabName" type="card" @on-click="changeTabs">
      <TabPane tab="type" label="还领料工单" name="还领料工单" context-menu>
        <mainTable :data="dataSet.tableData"></mainTable>
      </TabPane>
      <TabPane tab="type" label="工单信息" name="工单信息" context-menu>
        <workTable :data="dataSet.workTableData"></workTable>
      </TabPane>
    </Tabs>
    <createModal :dataSet="dataSet"></createModal>
    <editModal :dataSet="dataSet"></editModal>
    <detailModal :dataSet="dataSet"></detailModal>
  </component>
</template>

<script>

import ancMixin from "./ancMixin";
export default {
  name: "",

  mixins: [ancMixin],
  data() {
    return {
      tabName:"还领料工单"
    };
  },
  props: {},
  watch: {},
  computed: {
    view() {
      return {
        type: ["starGenView", "starTwoView", "starThreeView"][0],
        attrs: {
          left: 12,
          right: 12,
          middle: 0,
          minLeftHeight: "600px",
          title: {
            "en-US": "abc",
            "zh-CN": "还原领料工单",
          }[this.G_Locale],
          fontStyle: {},
        },
      };
    },
  },
  created() {},
  mounted() {},
  methods: {
    show() {
      this;
    },
    changeTabs(name) {
      this.tabName = name;
      if (name == "工单信息") {
        this.workLoadPage()
      } else {
        
        this.vms.mainTable.pageNavigation.pageNumber = 1;
        this.loadPage(this.vms.mainTable.pageNavigation,{})
      }
    },
  },
};
</script>
<style>
.ivu-input[disabled],
fieldset[disabled] .ivu-input {
  background: #fff;
}
.ivu-input[disabled]:hover,
fieldset[disabled] .ivu-input:hover {
  background: #fff;
}
.ivu-select-disabled .ivu-select-selection {
  background: #fff;
}
.ivu-input[disabled],
fieldset[disabled] .ivu-input,
.ivu-select-input[disabled] {
  color: #333;
}
</style>
